<template>
  <!--标签行组件-->
  <div class="labelTiter" :style="{ borderLeftColor: borderLeftColor }">
    <span :style="{ color: borderLeftColor }">{{ titer }}</span>
    <RouterLink :to="routerLink">
      <span>更多</span>
      <svg class="labelRightIcon" aria-hidden="true">
        <use xlink:href="#icon-youjiantou"></use>
      </svg>
    </RouterLink>
  </div>
</template>

<script>
export default {
  name: "LabelTiter",
  props: {
    //left边框颜色
    borderLeftColor: {
      style: String,
      default: "#eed062",
    },
    //left文本
    titer: {
      style: String,
      default: "人气推荐",
    },
    routerLink: {
      style: String,
      default: "/",
    },
  },
};
</script>

<style scoped lang="less">
.labelTiter {
  //border: 1px solid red;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid;
  padding: 0 0.2rem 0 0.2rem;
  background-image: linear-gradient(to bottom right, #ffffff, #e2f7f8);
  //padding-left: 0.2rem;
  & > span {
    font-weight: bold;
    color: #d6b27d;
    font-size: 0.9rem;
  }
  :nth-child(2) {
    display: flex;
    span {
      color: #788fb1;
      font-size: 0.85rem;
      font-weight: 600;
      margin-top: 0.16rem;
    }
  }
}
.labelRightIcon {
  width: 1.5em;
  height: 1.5em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>
